import torch

def test(x,w):
    x = torch.tensor(x,dtype=torch.float32)
    w = torch.tensor(w,dtype=torch.float32)
    b = 1
    return torch.dot(x,w)+b
x=[1,2,3,4,5]
w=[0.1,0.2,0.3,0.4,0.5]
print(test(x,w))
print(test(x,w).item())